package com.qf.service.Impl;

import com.qf.dao.Impl.UserDaoImpl;
import com.qf.dao.UserDao;
import com.qf.entity.StuInfo;
import com.qf.service.UserService;

/**
 * @author a1275872671
 * @version v1.0
 * @project guanqipeng
 * @package com.qf.service.Impl
 * @company
 * @date 2024/4/30 09:38
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao=new UserDaoImpl();

    @Override
    public StuInfo Login(String shuno, String pwd) {
        StuInfo stuInfo=userDao.select(shuno,pwd);
        if (stuInfo == null) {
            throw new RuntimeException("用户名或密码错误");
        }
        return stuInfo;
    }
}
